//
//  EFTitleAddressCell.m
//  EnjogFood
//
//  Created by guocheng on 2017/5/4.
//  Copyright © 2017年 wf. All rights reserved.
//

#import "EFTitleAddressCell.h"
#import "EFTitleAddressItem.h"

@interface EFTitleAddressCell()

@property(strong,nonatomic) UILabel* titleLabel;

@end

@implementation EFTitleAddressCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self){
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.contentView.backgroundColor = [UIColor clearColor];
        self.backgroundColor = RGBCOLOR(0xF5F9F9);
        [self initView];
    }
    return self;
}

-(void)initView{
    [self.contentView addSubview:self.titleLabel];
}

-(void)layoutSubviews{
    self.titleLabel.left = 19;
    self.titleLabel.top = 20;
    self.titleLabel.width = kScreenWidth;
    self.titleLabel.height = 17;
    
}
-(void)setObject:(EFTitleAddressItem *)item{
    [self.titleLabel setText:item.name];
}

-(UILabel*)titleLabel{
    if(_titleLabel == NULL){
        _titleLabel = [[UILabel alloc ] init];
        _titleLabel.font = [UIFont systemFontOfSize:15];
        _titleLabel.textColor = kBlack999;
    }
    return _titleLabel;
}
 

@end
